package com.abu.classroom.pojo;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 教室资源表
 * </p>
 *
 * @author 阿布
 * @since 2021-02-05
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("cs_classroom")
@ApiModel(value = "Classroom对象", description = "教室资源表")
public class Classroom implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "classroom_id", type = IdType.ASSIGN_ID)
    private Long classroomId;

    @ApiModelProperty(value = "教学楼")
    private String building;

    @ApiModelProperty(value = "教室名")
    private String classroomName;

    @ApiModelProperty(value = "类别 0-表示小30人，1表示中50人，2表示大90人")
    private String type;

    @ApiModelProperty(value = "可以容纳多少人")
    private Integer content;

    @ApiModelProperty(value = "是否启用")
    private Boolean status;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime gmtCreate;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime gmtModified;

    @TableField("is_deleted")
    @TableLogic
    private Boolean deleted;
}
